/**
 * 
 */
package design_pattern.decorator.order;

/**
 * @author linzq
 *
 */
public class HeaderDecorator extends OrderDecorator {

  /**
   * @param order
   */
  public HeaderDecorator(Order order) {
    super(order);
  }

  @Override
  public void print() {
    this.printHeader();
    super.print();
  }

  /**
   * 
   */
  private void printHeader() {
    System.out.println("\t***\tINVOICE\t***");
    System.out.println("XYZ incorporated \n Date of sale");
    System.out.println(order.getSaleDate());
    System.out.println("=================================");
    System.out.println("Item \t\tUnits\tUnitPrice\tSubtotal");
  }

}
